<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.biz.utils.ConfigUtil" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html class="no-js">
<head>
  <meta charset="UTF-8">
  <title>全部商品</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <jsp:include page="/jsp/inc.jsp"></jsp:include>

</head>
<body style="background-color: #fff;">
<div class="codeshoptop">
    <div class="fl-l"><span class="iconduihuan" onclick="toChargeList()">兑换记录</span></div>
    <div class="fl-r shoptopright">
        <span class="duiable">可兑积分：${pbaseUser.integralNow.intValue()}</span>
        <span class="ttcode" onclick="toIntegralDetail();">累积积分：${pbaseUser.integralTotal.intValue()}</span>
    </div>
    <br class="clear"/>
</div>
<div class="">
    <article class="m-list list-theme1 homegdlist">
        <c:choose>
            <c:when test="${not empty goodsList}">
                <c:forEach items="${goodsList}"  var="obj" varStatus="vs">
                    <a onclick="toGoodsDetail('${obj.id}');" class="list-item">
                        <div class="list-img">
                            <img src="<%=ConfigUtil.get("OSSURL")%>${obj.path}" data-url="">
                        </div>
                        <div class="list-mes">
                            <h3 class="list-title">${obj.name}</h3>
                            <div class="list-mes-item jfmargin">
                                <span class="shopgdjf">${obj.price}积分</span>
                            </div>
                            <div class="list-mes-item">
                                <span class="shopgdxl">已售 ${obj.sales}</span>
                            </div>
                        </div>
                    </a>
                </c:forEach>
            </c:when>
            <c:otherwise>
                <div class="notxt">
                    <img src="<%=basePath%>resources/image/icon-nullnull.png" alt="" class="notxtImg">
                    <div class="nultxttip">暂无商品</div>
                </div>

            </c:otherwise>
        </c:choose>
    </article>
</div>

<script type="text/javascript">
    $("body").on("click",".sortmain",function(){
        $(".sortlists").toggle();
    })
    $(".sortlists li").click(function(){
        $(".sortlists").hide();
    })


    //跳转累计积分
    function toIntegralDetail()
    {
        window.location.href='${pageContext.request.contextPath}/userCenter/toInteralTotal.ac';
    }

    function toGoodsDetail(id)
    {
        window.location.href='${pageContext.request.contextPath}/goods/toGoodsDetail.ac?goodsId='+id;
    }

    //兑换记录
    function toChargeList()
    {
        window.location.href='${pageContext.request.contextPath}/goods/toChargeHistory.ac';
    }
</script>
</body>
</html>

